import 'package:json_annotation/json_annotation.dart';

part 'taskItem.g.dart';

@JsonSerializable()

class TaskItem{
  int id;
  String taskName;
  String ifDownloadStr = '未下载';
  bool check = false;

  TaskItem({this.id, this.taskName,this.ifDownloadStr,this.check=false});

  TaskItem.empty();

  //不同的类使用不同的mixin即可
  factory TaskItem.fromJson(Map<String, dynamic> json) => _$TaskItemFromJson(json);

  Map<String, dynamic> toJson() => _$TaskItemToJson(this);
}